﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControl_Header : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (PageHelper.IsLanded)
        {
            divUserInfo.InnerHtml = string.Format("<a href=\"{0}\">[ {1} ]</a>", 
                PageHelper.Url("UserPage/UserDefault.aspx"), PageHelper.CurrentUser.Email);
            divUser.Visible = true;
            divGuest.Visible = false;
        }
        else
        {
            divGuest.Visible = true;
            divUser.Visible = false;
        }
    }
}